package com.example.sharding.services.impl;

import com.alibaba.fastjson.JSON;
import com.example.sharding.mappers.ProductInfoMapper;
import com.example.sharding.models.ProductInfo;
import com.example.sharding.services.ProductInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class ProductInfoServiceImpl implements ProductInfoService {

    @Resource
    private ProductInfoMapper productInfoMapper;

    @Override
    public List<ProductInfo> findAll(String data) {
        Map map = (Map)JSON.parseObject(data);
        return productInfoMapper.findAll(map);
    }

    @Override
    public String save(String data) {
        return null;
    }
}
